Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Value.SummaryList): spacing of help when wrapped in Form.InfoOverlay #4667

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

langz
Copy link
Contributor

@langz langz commented Mar 5, 2025

Motivation: https://dnb-it.slack.com/archives/CMXABCHEY/p1741186089782099?thread_ts=1740042283.488439&cid=CMXABCHEY
CSB of the issue: https://codesandbox.io/p/devbox/value-padding-forked-jsz5nm?workspaceId=ws_LbiDwJdEBdbwxH2AkyAyVE

Issue is happening because the existing styling does not work when it shows up a div like so:
<div class="dnb-space dnb-height-animation dnb-forms-visibility dnb-height-animation--is-visible dnb-height-animation--is-in-dom dnb-height-animation--parallax" aria-hidden="false">VALUE CONTENT HERE</div>

Screenshot from CSB:
Screenshot 2025-03-05 at 19 04 20

I've added a "quickfix" for this now, but doesn't feel 100% correct, as I'm just adding a specific selector to apply the existing css with margin when there's a div there as well.

I'm not sure why the div is present when wrapped in a Form.InfoOverlay, the fix could perhaps be related to not applying that div(if possible).

Copy link

vercel bot commented Mar 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 7:52pm

@langz langz requested a review from tujoworker March 5, 2025 18:10
@langz langz force-pushed the fix/value-summarylist-in-info-overlay branch from e9b3add to 201f039 Compare March 5, 2025 18:11
@langz langz changed the title fix(Value.SummaryList): spacing help when wrapped in Form.InfoOverlay fix(Value.SummaryList): spacing of help when wrapped in Form.InfoOverlay Mar 5, 2025
Copy link

codesandbox-ci bot commented Mar 5, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@tujoworker
Copy link
Member

tujoworker commented Mar 5, 2025

ohh, it looks like we need to fix this (in another PR). A div inside a dt is not valid HTML.

<dl>
  <dt>
    <div>Invalid Term</div> <!-- ❌ Not valid -->
  </dt>
  <dd>Definition</dd>
</dl>

I will commit a selector change to make it more save anyways.

@langz langz merged commit b7a2702 into main Mar 5, 2025
10 checks passed
@langz langz deleted the fix/value-summarylist-in-info-overlay branch March 5, 2025 20:04
tujoworker pushed a commit that referenced this pull request Mar 5, 2025
## [10.66.1](v10.66.0...v10.66.1) (2025-03-05)

### 🐛 Bug Fixes

* **DatePicker:** clear internal date when passing null ([#4656](#4656)) ([3ba3b26](3ba3b26))
* **Field.Date:** add missing support for `skipPortal` ([#4666](#4666)) ([975f3ea](975f3ea))
* **Field.Upload:** improve styling of `help` button ([#4659](#4659)) ([8a10d7c](8a10d7c))
* **Field.Upload:** set `aria-required` and `required` props in input rather than div ([#4655](#4655)) ([7db1f04](7db1f04))
* **Forms:** always render Field.Composition with a `fieldset` ([#4661](#4661)) ([a3991a1](a3991a1))
* **Value.SummaryList:** spacing of `help` when wrapped in `Form.InfoOverlay` ([#4667](#4667)) ([b7a2702](b7a2702)), closes [/github.com//pull/4667/files#diff-281ca53e6a78ae24056e8fc94bf0274576aef89044ddcc613fb09b0844023e13R50](https://github.com/dnbexperience//github.com/dnbexperience/eufemia/pull/4667/files/issues/diff-281ca53e6a78ae24056e8fc94bf0274576aef89044ddcc613fb09b0844023e13R50)
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.66.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants